SELECT t.PERMISSION_CODE FROM c1_user_permission t
WHERE t.USER_CODE = :userCode
AND (t.BEGIN_DATE >= NOW() OR t.END_DATE >= NOW())
AND (t.BEGIN_DATE <= NOW() OR t.END_DATE <= NOW())
